package com.ojoin.trade.common.web.service;

import java.util.List;

import com.ojoin.trade.common.exception.BusinessException;
import com.ojoin.trade.common.web.domain.TbUploadFile;
import org.springframework.data.domain.Pageable;


public interface TbUploadFileService extends
		BaseService<TbUploadFile> {

	/**
	 * 更新上传文件的上传状态及文件类型
	 * @param id
	 * @param status
	 * @param filetype
	 * @return
	 * @throws BusinessException
	 */
	public int updateFileTypeAndStatusById(int id, String status, String filetype) throws BusinessException;
	
	public int updateStatusById(int id, String status) throws BusinessException;
		
	public List<TbUploadFile> queryUnCommitAfter(int day) throws BusinessException;
	/**
	 * 删除一段时间后未提交的上传文件
	 * @throws BusinessException
	 */
	public void deleteUnCommit(TbUploadFile file) throws BusinessException;
	
	/**
	 * 根据条件下载文件
	 * @param joinuserid
	 * @param filetype
	 * @param platformtype
	 * @param startdate
	 * @param enddate
	 * @throws BusinessException
	 */
	public List<TbUploadFile> getFileListByCondition(Integer joinuserid, String filetype, String platformtype, String startdate, String enddate,Pageable page) throws BusinessException;
	
}